﻿@model IEnumerable<WebBarracoDoSom.Models.Usuario>

@{
    ViewBag.Title = "Cadastrar Usuário";

}

<h2>Usuários Cadastrados no Sistema</h2>

<table>
    <tr>
        <th align="center">
            Nome
        </th>
        <th align="center">
            RG
        </th>
        <th align="center">
            CPF
        </th>
        <th align="center">
            Email
        </th>
        <th align="center">
            Telefone
        </th>
        <th align="center">
            Senha
        </th>
        <th align="center">
            Prioridade
        </th>
    </tr>

@foreach (var item in Model) {
    if (item.Prioridade != 0)
    {
        <tr>
            <td align="center">
                @Html.DisplayFor(modelItem => item.Nome)
            </td>
            <td align="center">
                @Html.DisplayFor(modelItem => item.RG)
            </td>
            <td align="center">
                @Html.DisplayFor(modelItem => item.CPF)
            </td>
            <td align="center">
                @Html.DisplayFor(modelItem => item.Email)
            </td>
            <td align="center">
                @Html.DisplayFor(modelItem => item.Telefone)
            </td>
            <td align="center">
                @Html.DisplayFor(modelItem => item.Senha)
            </td>
            <td align="center">
                @Html.Label(WebBarracoDoSom.Controllers.UsuariosController.GetType(item.Prioridade))
            </td>
            <td align="center">
                @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                @Html.ActionLink("Details", "Details", new { id = item.ID }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.ID })
            </td>
        </tr>
    }
}

</table>
